<template>
  <ul>
    <li v-for="(item, index) in TodosStore.todos" :key="item.id">
      <div>
        <input type="checkbox" v-model="item.isDone" />
        <span :class="[item.isDone ? 'line' : '']">{{ item.name }}</span>
      </div>
      <div @click="TodosStore.delTodo(index)" class="iconfont icon-a-11-Xhao01"></div>
    </li>
  </ul>
</template>

<script setup>
import useTodosStore from "../Store/modules/Todos";

const TodosStore = useTodosStore();
</script>

<style lang="scss" scoped>
li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  .line {
    color: #666;
    text-decoration: line-through;
  }
  .iconfont {
    font-size: 25px;
    color: red;
  }
}
</style>